package cn.tedu.test;

import java.util.Arrays;
import java.util.Random;

public class ShuffleArray {
    public static void main(String[] args) {
        int[] a=new int[5];
        f(a);
    }

    private static void f(int[] a) {
        a[0]=new Random().nextInt(100);
        for(int i=1;i<a.length;i++){
            a[i]=a[0]+i;
        }
        System.out.println(Arrays.toString(a));
        for(int i=0;i<a.length;i++){
            int j=new Random().nextInt(a.length);
            int t=a[i];
            a[i]=a[j];
            a[j]=t;
        }
        System.out.println(Arrays.toString(a));
    }


}
